Skip to content

Instantly share code, notes, and snippets.

View ba11b0y's full-sized avatar

Rahul Tiwari ba11b0y

View GitHub Profile
// Contributor: julio641742
/*
In this example we will be click a button in the top bar,
causing an event that create a text label (hello world), which with some
animation, will be decreasing its opacity from 100% to 0%
*/
/* Import St because is the library that allow you to create UI elements */
const St = imports.gi.St;
@gpalsingh
gpalsingh / Google ICS: Mobile Web, Course 2 Summary.md
Last active March 8, 2018 11:47
My notes on course on ES6. Not comprehensive.

Lesson 6: Syntax

  • let: Variables can be reassigned, but can’t be redeclared in the same scope.
  • const: Variables must be assigned an initial value, but can’t be redeclared in the same scope, and can’t be reassigned.
  • Hoisting: Before any JavaScript code is executed, all variables are hoisted, which means they're raised to the top of the function scope.
  • Temporal dead zone: If a variable is declared using let or const inside a block of code, then the variable is stuck in what is known as the temporal dead zone until the variable’s declaration is processed.
  • Suggested to ditch var in place of using let and const.
  • Template literals: Denoted with backticks ( `` ), template literals can contain placeholders which are represented using ${expression}.
  • Examples:
@ba11b0y
ba11b0y / .gitignore
Created December 11, 2017 13:48
Gitignore for django projects
*.pyc
*~
__pycache__
db.sqlite3
/static
.DS_Store
@ba11b0y
ba11b0y / installing-postman.md
Last active August 31, 2023 19:21
Installing Postman on Ubuntu/Gnome

Since Chrome apps are now being deprecated. Download postman from https://dl.pstmn.io/download/latest/linux

Although I highly recommend using a snap

sudo snap install postman

Installing Postman

tar -xzf Postman-linux-x64-5.3.2.tar.gz
@oifland
oifland / Jenkinsfile
Last active March 23, 2024 17:59
Loops in Jenkinsfiles
// Related to https://issues.jenkins-ci.org/browse/JENKINS-26481
abcs = ['a', 'b', 'c']
node('master') {
stage('Test 1: loop of echo statements') {
echo_all(abcs)
}
stage('Test 2: loop of sh commands') {
@aviskase
aviskase / Postman.desktop
Last active November 21, 2023 20:56
Install Postman
[Desktop Entry]
Encoding=UTF-8
Name=Postman
Exec=postman
Icon=/home/USERNAME/Postman/app/resources/app/assets/icon.png
Terminal=false
Type=Application
Categories=Development;
@Faheetah
Faheetah / Jenkinsfile.groovy
Last active May 9, 2024 20:15
Jenkinsfile idiosynchrasies with escaping and quotes
node {
echo 'Results included as an inline comment exactly how they are returned as of Jenkins 2.121, with $BUILD_NUMBER = 1'
echo 'No quotes, pipeline command in single quotes'
sh 'echo $BUILD_NUMBER' // 1
echo 'Double quotes are silently dropped'
sh 'echo "$BUILD_NUMBER"' // 1
echo 'Even escaped with a single backslash they are dropped'
sh 'echo \"$BUILD_NUMBER\"' // 1
echo 'Using two backslashes, the quotes are preserved'
sh 'echo \\"$BUILD_NUMBER\\"' // "1"
@subfuzion
subfuzion / curl.md
Last active May 16, 2024 18:04
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

==========================
How Software Companies Die
==========================
- Orson Scott Card
The environment that nurtures creative programmers kills management and
marketing types - and vice versa.
Programming is the Great Game. It consumes you, body and soul. When
you're caught up in it, nothing else matters. When you emerge into
@tmichel
tmichel / index.html
Created November 9, 2013 22:07
simple websocket example with golang
<html>
<head>
<title>WebSocket demo</title>
</head>
<body>
<div>
<form>
<label for="numberfield">Number</label>
<input type="text" id="numberfield" placeholder="12"/><br />