This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ["0"] => array ( | |
| ["name"] => "american-sign-language-interpreting", | |
| ["className"] => "fa fa-american-sign-language-interpreting", | |
| ), | |
| ["1"] => array ( | |
| ["name"] => "asl-interpreting (alias)", | |
| ["className"] => "fa fa-asl-interpreting", | |
| ), | |
| ["2"] => array ( | |
| ["name"] => "assistive-listening-systems", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $filename = 'snippets.json'; | |
| $f = file_get_contents( $filename ); | |
| $data = json_decode( $f, true ); | |
| echo "<pre>"; | |
| convertJSONtoArray( $data, 0 ); | |
| echo "</pre>"; | |
| function convertJSONtoArray( $data, $level ) // level - уровень вложенности чтобы табуляцию писать правильную | |
| { | |
| foreach( $data as $key1 => $value1 ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var all = []; | |
| var main = []; | |
| jQuery('.glyph div').each(function(index, div) { | |
| var name = jQuery('div.pbs').find('.mls'); | |
| var className = jQuery(name).text(); | |
| all.push(className); | |
| }); | |
| main = all[0].split(" "); | |
| main.forEach((item) => { | |
| if(item.length) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| read n | |
| text="" | |
| for ((i=0; i<n; i++)) | |
| do | |
| temp="" | |
| read input | |
| temp=${input:2:1} | |
| text=$text$temp | |
| done | |
| for ((i=0; i<n; i++)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| while read C; do | |
| text=${C:1:1} | |
| text=$text${C:6:1} | |
| echo $text | |
| done | |
| or | |
| while read C; do | |
| cut -c 2,7 <<< ${C} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "bytes" | |
| "log" | |
| "context" | |
| "fmt" | |
| "net/http" | |
| "time" | |
| "encoding/json" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function copyFiles() { | |
| arr=("$@") | |
| for i in "${arr[@]}"; | |
| do | |
| echo "$i" | |
| done | |
| } | |
| array=("one" "two" "three") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| foo() { | |
| echo "Parameter #1 is $1" #and this is the argument value | |
| echo "$2" | |
| } | |
| foo "hello" "what" #this are the argument you are passing to foo function |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var db = firebase.firestore(); | |
| var content = require("./sourceData.json"); | |
| content && | |
| Object.keys(content).forEach(contentKey => { | |
| const nestedContent = content[contentKey]; | |
| if (typeof nestedContent === "object") { | |
| Object.keys(nestedContent).forEach(docTitle => { | |
| firebase | |
| .firestore() |